<?php

class Ticket extends AppModel {
    var $name = 'Ticket';
    var $hasMany = 'Comment';
    var $belongsTo = array('Type' =>
			   array('className'    => 'Type',
				 'conditions'   => '',
				 'order'        => '',
				 'foreignKey'   => 'type_id'
				 ),
			   'Priority' =>
			   array('className'    => 'Priority',
						'conditions'   => '',
				 'order'        => '',
				 'foreignKey'   => 'priority_id'
				 )
			   ,
			   'Report' =>
			   array('className'    => 'Report',
				 'conditions'   => '',
				 'order'        => '',
				 'foreignKey'   => 'report_id'
				 )
			   ,
			   'User' =>
			   array('className'    => 'User',
				 'conditions'   => '',
				 'order'        => '',
				 'foreignKey'   => 'user_id'
				 )
			   );
    
    
    var $validate = array(
			  'title' => array(
					   'rule' => 'notEmpty'
					   ),
		'body' => array(
				'rule' => 'notEmpty'
				)
			  );
}

?>